﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FuelEdit.aspx.cs" Inherits="Webcar.Car.FuelEdit" %>

<%@ Register Src="../Controls/NaviBar.ascx" TagName="NaviBar" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>编辑油耗和公里数</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <uc1:NaviBar ID="NaviBar1" runat="server" />
        <asp:GridView ID="GridView1" SkinID="gridviewSkin_line" DataKeyNames ="car_no,ny" runat="server" Width = "100%" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand">
        <Columns>
                <asp:BoundField DataField="ny" HeaderText="月份" />
                <asp:BoundField DataField="record_no" HeaderText="牌照号" />
            <asp:TemplateField HeaderText="里程表读数">
                <ItemTemplate>
                    <asp:TextBox ID="tbReadMile" Width="110px" runat="server" Text='<%# Bind("read_mile") %>'></asp:TextBox>
                    <asp:LinkButton ID="LinkButton1" CommandName="CalcMile" CommandArgument='<%# Container.DataItemIndex %>' runat="server">计算公里</asp:LinkButton>
                </ItemTemplate>
                <ItemStyle Width="170px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="本月公里数">
                <ItemTemplate>
                    <asp:TextBox ID="tbMile" Width="95%"  runat="server" Text='<%# Bind("mile") %>'></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="实际耗油量">
                <ItemTemplate>
                    <asp:TextBox ID="tbFuelNum" Width="95%" runat="server" Text='<%# Bind("fuel_num") %>'></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="计划百公里单耗">
                <ItemTemplate>
                    <asp:TextBox ID="tbFuelRation" Width="95%"  runat="server" Text='<%# Bind("fuel_ration") %>'></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="实际百公里单耗">
                <ItemStyle HorizontalAlign="Right" />
                <ItemStyle Width="130px" />
                <ItemTemplate>
                    <asp:Label ID="lblRation" runat="server" Text='<%# Bind("fact_ration") %>'></asp:Label>
                    <asp:LinkButton ID="LinkButton2" CommandName="PriviewRation" CommandArgument='<%# Container.DataItemIndex %>' runat="server">预览单耗</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            </Columns>
            
        </asp:GridView>
        <div class="div_taobao" style="text-align:right;margin-top:1px;">
        <div style ="text-align:left;float:left;">
            年度：<asp:TextBox ID="tbYear" runat="server" Width="68px"></asp:TextBox>
            <asp:Button ID="Button3" runat="server" Text="查询" UseSubmitBehavior = "false" SkinID ="default_button" OnClick="Button3_Click"/>
            </div>
            <asp:Button ID="Button1" runat="server" Text="保存" UseSubmitBehavior = "false" SkinID ="default_button" OnClick="Button1_Click" />
             <input id="Button2" type="button" value="返回" style="width:60px" class="button" onclick="javascript:history.back(1);" />
        </div>
        </div>
    </form>
</body>
</html>
